<?php
/**
 * Class to handle Emphasis elements
 *
 * @author		Joachim Ruf, Loresoft Software (http://www.loresoft.de)
 * @license		New BSD License
 * @version		Class for Bootstrap v2.3.2
 *
 * */


Class Bootstrap_Emphasis_Handler
{


	/**
	 *
	 * */
	function __construct () {

	}


	private function getParameter ($_class, array $_arrParam) {
		$result	= NULL;

		if (isset($_arrParam['class'])) { // Class-Parameter verbinden
			$_arrParam['class']	= $_arrParam['class'].' '.$_class;
		} else {
			$_arrParam['class']	= $_class;
		}

		foreach ($_arrParam as $key => $val) {
			$result	.= ' '.$key.'="'.$val.'"';
		}

		return $result;
	}


	/**
	 * Returns a Muted-Element
	 * @param string $_content
	 * @return string
	 * */
	public function getMuted ($_content, array $_arrParam = array()) {
		return '<p'.$this->getParameter('muted', $_arrParam).'>'.$_content.'</p>';
	}


	/**
	 * Returns a Warning-Element
	 * @param string $_content
	 * @return string
	 * */
	public function getWarning ($_content, array $_arrParam = array()) {
		return '<p'.$this->getParameter('text-warning', $_arrParam).'>'.$_content.'</p>';
	}


	/**
	 * Returns a Error-Element
	 * @param string $_content
	 * @return string
	 * */
	public function getError ($_content, array $_arrParam = array()) {
		return '<p'.$this->getParameter('text-error', $_arrParam).'>'.$_content.'</p>';
	}


	/**
	 * Returns a Info-Element
	 * @param string $_content
	 * @return string
	 * */
	public function getInfo ($_content, array $_arrParam = array()) {
		return '<p'.$this->getParameter('text-info', $_arrParam).'>'.$_content.'</p>';
	}


	/**
	 * Returns a Success-Element
	 * @param string $_content
	 * @return string
	 * */
	public function getSuccess ($_content, array $_arrParam = array()) {
		return '<p'.$this->getParameter('text-success', $_arrParam).'>'.$_content.'</p>';
	}


}


?>